package structure.flyweight;

import java.sql.SQLException;

import structure.bridge.impl.Connection;

public class FlyWeightTest {

	public static void main(String[] args) throws ClassNotFoundException, SQLException, InterruptedException {
		ConnectionPool pool = ConnectionPool.getInstance();
		Connection conn = pool.getConnection();
		System.out.println("获取数据库连接：" + conn);
		pool.release(conn);
		System.out.println("数据库连接池中连接数：" + pool.getConnectionCount());
	}

}
